window: Hide windows on destroy
authorMatthias Clasen <mclasen@redhat.com>
Tue, 12 May 2020 15:10:36 +0000 (11:10 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 12 May 2020 15:10:36 +0000 (11:10 -0400)
I thought I could get away with just unrealizing the
window, but it turns out that gtk_window_hide() is the
place where we remove grabs when a modal dialog goes
away, so we ended up with stuck grabs.

gtk/gtkwindow.c

index 8f1e37f727347041c3922d452a9ff45098825cde..5a755ef4500338f09bfaa5782b9a85122eb07c46 100644 (file)
@@ -7498,6 +7498,7 @@ gtk_window_destroy (GtkWindow *window)
         g_object_unref (item);
     }
 
+  gtk_window_hide (GTK_WIDGET (window));
   gtk_widget_unrealize (GTK_WIDGET (window));
 
   g_object_unref (window);